package com.tender.controller;

import com.tender.SysMsgAssoUserBizService;
import com.tender.common.Result;
import com.tender.condition.SysMsgAssoUserCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/ws/server/sysMsg")
public class SysMsgAssoUserController {

    @Autowired
    private SysMsgAssoUserBizService sysMsgAssoUserBizService;

    /**
     * 推送给用户的消息 需要将 userId 和 msgId 进行绑定入库
     */
    @PostMapping("/bind")
    public Result<Boolean> bindMsgWithUser(@RequestBody SysMsgAssoUserCondition condition) {
        return Result.success(sysMsgAssoUserBizService.bindMsgWithUser(condition));
    }

}
